Skip to content

Conversation

sofi004
Copy link
Contributor

@sofi004 sofi004 commented Jun 4, 2025

Added the possibility for the owl to carry three new types
of objects, coin, coin rain and coin explosion.
Since the owl cannot visually carry a coin rain or a
coin explosion, then visually the owl for these types carries
a single coin, but then when the owl ungrabs the coin,
the behavior is of a coin rain or a coin explosion respectively.
The coin drop is activated when the tux approaches.

Closes #3199

Added the possibility for the owl to carry three new types
of objects, coin, coin rain and coin explosion.
Since the owl cannot visually carry a coin rain or a
coin explosion, then visually the owl for these types carries
a single coin, but then when the owl ungrabs the coin,
the behavior is of a coin rain or a coin explosion respectively.
The coin drop is activated when the tux approaches.

Closes SuperTux#3199

Co-authored-by: Filipe Oleacu <[email protected]>
Comment on lines +49 to +51
if (is_grabbed())
// Don't do anything while being carried
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement looks equivalent to an empty method? Is this part work in progress?

@tobbi
Copy link
Member

tobbi commented Jun 4, 2025

There are a couple warnings found by CI:

/home/runner/work/supertux/supertux/src/object/coin_explode.cpp:43:8: error: unused variable 'emerge' [-Werror,-Wunused-variable]
  bool emerge = false;
       ^
1 error generated.
make[2]: *** [CMakeFiles/supertux2_lib.dir/build.make:2684: CMakeFiles/supertux2_lib.dir/src/object/coin_explode.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/runner/work/supertux/supertux/src/object/coin.cpp:45:3: error: field 'm_count_stats' will be initialized after field 'm_on_ground' [-Werror,-Wreorder-ctor]
  m_count_stats(count_stats),
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
  m_running_grab_script(false)
/home/runner/work/supertux/supertux/src/object/coin.cpp:68:3: error: field 'm_count_stats' will be initialized after field 'm_on_ground' [-Werror,-Wreorder-ctor]
  m_count_stats(count_stats),
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
  m_running_grab_script(false)
2 errors generated.

@Alasdairbugs Alasdairbugs added status:needs-information PR/Issue author needs to provide additional information category:code labels Jul 7, 2025
@Alasdairbugs
Copy link
Contributor

I think this is partially incomplete,

More should be discussed on what other objects to add to the owls, not just coins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:code status:needs-information PR/Issue author needs to provide additional information
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Coin, coin rain and coin explosion carry support for Owl enemy
3 participants